<%@ page import="ar.com.photo_admin.domain.Client" %>



<div class="fieldcontain ${hasErrors(bean: clientInstance, field: 'telephone', 'error')} ">
	<label for="telephone">
		<g:message code="client.telephone.label" default="Telephone" />
		
	</label>
	<g:textField name="telephone" value="${clientInstance?.telephone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: clientInstance, field: 'address', 'error')} ">
	<label for="address">
		<g:message code="client.address.label" default="Address" />
		
	</label>
	<g:textField name="address" value="${clientInstance?.address}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: clientInstance, field: 'birthday', 'error')} ">
	<label for="birthday">
		<g:message code="client.birthday.label" default="Birthday" />
		
	</label>
	<g:datePicker name="birthday" precision="day"  value="${clientInstance?.birthday}" default="none" noSelection="['': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: clientInstance, field: 'email', 'error')} ">
	<label for="email">
		<g:message code="client.email.label" default="Email" />
		
	</label>
	<g:textField name="email" value="${clientInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: clientInstance, field: 'events', 'error')} ">
	<label for="events">
		<g:message code="client.events.label" default="Events" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${clientInstance?.events?}" var="e">
    <li><g:link controller="event" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="event" action="create" params="['client.id': clientInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'event.label', default: 'Event')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: clientInstance, field: 'facebookUid', 'error')} ">
	<label for="facebookUid">
		<g:message code="client.facebookUid.label" default="Facebook Uid" />
		
	</label>
	<g:textField name="facebookUid" value="${clientInstance?.facebookUid}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: clientInstance, field: 'firstName', 'error')} ">
	<label for="firstName">
		<g:message code="client.firstName.label" default="First Name" />
		
	</label>
	<g:textField name="firstName" value="${clientInstance?.firstName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: clientInstance, field: 'lastName', 'error')} ">
	<label for="lastName">
		<g:message code="client.lastName.label" default="Last Name" />
		
	</label>
	<g:textField name="lastName" value="${clientInstance?.lastName}"/>
</div>

